{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    {% load static %}
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta name="description" content="Xenon Boostrap Admin Panel"/>
    <meta name="author" content=""/>
    <title>帐号信息-个人中心-玩吧后台管理</title>
    <link rel="stylesheet" href="{% static "assets/css/fonts/linecons/css/linecons.css" %}">
    <link rel="stylesheet" href="{% static "assets/css/fonts/fontawesome/css/font-awesome.min.css" %}">
    <link rel="stylesheet" href="{% static "assets/css/bootstrap.css" %}">
    <link rel="stylesheet" href="{% static "assets/css/xenon-core.css" %}">
    <link rel="stylesheet" href="{% static "assets/css/xenon-forms.css" %}">
    <link rel="stylesheet" href="{% static "assets/css/xenon-components.css" %}">
    <link rel="stylesheet" href="{% static "assets/css/xenon-skins.css" %}">
    <link rel="stylesheet" href="{% static "assets/css/custom.css" %}">
    <link rel="stylesheet" href="{% static "css/../../../Apps/LN_game/static/assets/css/style.css" %}">
    <link rel="stylesheet" href="{% static "css/jquery-labelauty.css" %}">
    <link rel="stylesheet" href="{% static "css/jquery-ui.css" %}">
    {% block css_section %}{% endblock %}

    <script src="{% static "assets/js/jquery-1.11.1.min.js" %}" type="text/javascript"></script>
    <script src="{% static "assets/js/jquery.validate.min.js" %}" type="text/javascript"></script>
    <script src="{% static "js/../../../Apps/LN_game/static/assets/js/jquery-ui.min.js" %}" type="text/javascript"></script>

    <script src="{% static "js/validation.js" %}" type="text/javascript"></script>
    <script src="{% static "js/common.js" %}" type="text/javascript"></script>
    {% block top_script_section %}{% endblock %}
</head>
<body class="page-body">
<style>
    .error {
        color: red;
    }
</style>
<script type="text/javascript">
    $(document).ready(function(){
{#        function validate_func() {#}
            $("#id_update_password").validate({
                rules: {
                    old_password: {
                        required: true,
                        maxlength: 20,
                        minlength: 6
                    },
                    new_password: {
                        required: true,
                        maxlength: 20,
                        minlength: 6
                    },
                    confirm_password: {
                        required: true,
                        equalTo: '#new_password'
                    }
                },
                messages: {
                    old_password: {
                        required: "不能为空",
                        minlength: "密码不能低于6位"
                    },
                    new_password: {
                        required: "不能为空",
                        minlength: "密码不能低于6位"
                    },
                    confirm_password: {
                        required: "",
                        equalTo: "密码不一致"
                    }
                },
                submitHandler: function (form) {
                    var old_pwd = form.old_password.value;
                    var new_pwd = form.new_password.value;

                    $.post("/APKManager/update_password/",
                            {"old_password": old_pwd,
                                "new_password":new_pwd},
                            function (data){
                                if (data.rltcode == 0) {
                                    $("#id_pwd_div").dialog("close");
                                } else {
                                    var errmsg = '<div><label style="color:red;">'+data.rltmsg+'</label></div>';
                                    $("#id_content").after(errmsg);
                                }
                            });
                }
            });
{#        }#}

        $("#id_pwd_div").dialog({
            autoOpen: false,
            height: 400,
            width: 600,
            modal: true,
            title: "",
            buttons: {
                "提交": function () {
                    $("#id_update_password").submit();
                },
                "取消": function () {
                    $(this).dialog("close");
                }
            }
        });
        $("#id_obj_pwd").click(function(){
            $("#id_pwd_div").dialog("open");
        });
    });
</script>
<div id="id_pwd_div" title="更改密码">
    <form id="id_update_password">
            <div id="id_content" style="">
                <ul style="margin:0 auto;display:block;width:320px;height:240px;padding-top: 40px;">
                    <li>
                        <div style="margin-top: 20px;">
                            <label>旧密码:&nbsp;&nbsp;&nbsp;&nbsp;</label><input type="password" id="old_password" name="old_password" style="margin-left: 30px;"/>
                        </div>
                    </li>
                    <li>
                        <div style="margin-top: 20px;">
                            <label>新密码:&nbsp;&nbsp;&nbsp;&nbsp;</label><input type="password" id="new_password" name="new_password" style="margin-left: 30px;"/>
                        </div>
                    </li>
                    <li>
                        <div style="margin-top: 20px;">
                            <label>确认密码:</label><input type="password" id="confirm_password" name="confirm_password" style="margin-left: 30px;"/>
                        </div>
                    </li>
                </ul>
            </div>
{#        <div>#}
{#            <input type="submit">#}
{#        </div>#}
    </form>
</div>

<div class="page-container">
    <div class="sidebar-menu toggle-others fixed my_sidebar-menu">
        <div class="sidebar-menu-inner">
            <header class="logo-env">
                <div class="logo">
                    <a href="dashboard-1.html" class="logo-expanded">
                        <img src="{% static "assets/images/my_logo_b.png" %}" width="170" alt=""/>
                    </a>
                    <a href="dashboard-1.html" class="logo-collapsed">
                        <img src="{% static "assets/images/my_logo_s.png" %}" width="40" alt=""/>
                    </a>
                </div>
            </header>
            <ul id="main-menu" class="main-menu">
                {% for menu_item in menu_list %}
                    {% if menu_item.active %}
                        <li class="active opened active">
                            {% else %}
                        <li>
                    {% endif %}
                <a href="{{ menu_item.url }}">
                    <i class="linecons-cog"></i>
                    <span class="title">{{ menu_item.title }}</span>
                </a>
                {% if menu_item.sub_menus %}
                    <ul>
                        {% for subm in menu_item.sub_menus %}
                            {% if subm.active %}
                                <li class="active">
                                    {% else %}
                                <li>
                            {% endif %}
                        <a href="{{ subm.url }}">
                            <span class="title">{{ subm.title }}</span>
                        </a>
                        </li>
                        {% endfor %}
                    </ul>
                {% endif %}
                </li>
                {% endfor %}
            </ul>
        </div>
    </div>
    <div class="main-content">
        <!-- User Info, Notifications and Menu Bar -->
        <nav class="navbar user-info-navbar" role="navigation" id="id_navbar">
            <!-- Left links for user info navbar -->
            <ul class="user-info-menu left-links list-inline list-unstyled"
                style=" zoom:1; overflow:hidden;">
                <li class="hidden-sm hidden-xs">
                    <p>
                        <i class="fa-bars"> 后台管理系统</i>
                    </p>
                </li>
            </ul>
            <!-- Right links for user info navbar -->
            <ul class="user-info-menu right-links list-inline list-unstyled">
                <li class="dropdown user-profile">
                    <a href="#" data-toggle="dropdown"
                       style=" zoom:1; overflow:hidden; height:73px;">
                        <img src="../assets/images/user-4.png" alt="user-image"
                             class="img-circle img-inline userpic-32" width="28"/>
							<span>
								{{ user.account }}
								<i class="fa-angle-down"></i>
							</span>
                    </a>
                    <ul class="dropdown-menu user-profile-menu list-unstyled">
                        <li>
                            <a id="id_obj_pwd">更改密码</a>
                        </li>
                        <li class="last">
                            <a href="{{ urls.logout }}">
                                <i class="fa-lock"></i>
                                退出
                            </a>
                        </li>
                    </ul>
                </li>
            </ul>
        </nav>
        <div class="page-title">
            <div class="breadcrumb">
                <ol class="breadcrumb bc-1">
                    {% for menuitem in menu_list %}
                        {% if menuitem.active %}
                            <li>
                                <a href="{{ menuitem.url }}">{{ menuitem.title }}</a>
                            </li>
                            {% for subm in menuitem.sub_menus %}
                                {% if subm.active %}
                                    <li class="active">
                                        <a href="{{ subm.url }}">{{ subm.title }}</a>
                                    </li>
                                {% endif %}
                            {% endfor %}
                        {% endif %}
                    {% endfor %}
                </ol>
            </div>
        </div>

        {% block content_section %}{% endblock %}

        <footer class="main-footer sticky footer-type-1">
            <div class="footer-inner">
                <!-- Add your copyright text here -->
                <div class="footer-text">
                    &copy; 2014
                    <strong>优地</strong>
                    技术有限公司
                </div>
                <div class="go-up">
                    <a href="#" rel="go-top">
                        <i class="fa-angle-up"></i>
                    </a>
                </div>
            </div>
        </footer>
    </div>
</div>
<link rel="stylesheet" href="{% static "assets/js/datatables/dataTables.bootstrap.css" %}">
<!-- Bottom Scripts -->
<script src="{% static "assets/js/bootstrap.min.js" %}"></script>
<script src="{% static "assets/js/TweenMax.min.js" %}"></script>
<script src="{% static "assets/js/resizeable.js" %}"></script>
<script src="{% static "assets/js/joinable.js" %}"></script>
<script src="{% static "assets/js/xenon-api.js" %}"></script>
<script src="{% static "assets/js/xenon-toggles.js" %}"></script>
<script src="{% static "assets/js/datatables/js/jquery.dataTables.min.js" %}"></script>


<script src="{% static "assets/js/datatables/dataTables.bootstrap.js" %}"></script>
<script src="{% static "assets/js/datatables/yadcf/jquery.dataTables.yadcf.js" %}"></script>
<script src="{% static "assets/js/datatables/tabletools/dataTables.tableTools.min.js" %}"></script>

<!-- JavaScripts initializations and stuff -->
<script src="{% static "assets/js/xenon-custom.js" %}"></script>
<script src="{% static "js/../../../Apps/LN_game/static/assets/js/jquery-labelauty.js" %}"></script>
<script>
    $(function () {
        $(':input').labelauty();
    });
</script>
{% block bottom_script_section %}{% endblock %}
</body>
</html>